import { httpGet, httpPost } from "@/utils/request";
//获取分享加密数据
export const fetchShareParamInfo = (data = {}) => {
  return httpGet({
    url: "/share/getShareParam",
    data: data,
  });
};
//获取分享数据
export async function fetchShareInfo(data) {
  return httpGet({
    url: "/share/getShareInfo",
    data: data,
  });
}


////根据id获取商品列表
export const fetchListGoodsByIds = (data = {}) => {
  return httpGet({
    url: "/user/goods/listGoodsByIds",
    data: data,
  });
};

//用户端获取页面配置详情
export const fetchPageConfigDetailForUser = (data = {}) => {
  return httpGet({
    url: "/common/pageConfig/getPageConfigDetailForUser",
    data: data,
  });
};
//设置默认
export async function fakeSetDefault(data) {
  return httpPost({
    url: "/organization/user/address/setDefault",
    data: data,
  });
}

//线上答疑
export const fetchListUserQa = (data = {}) => {
  return httpGet({
    url: "/userQa/listUserQa",
    data: data,
  });
};
////根据id获取秒杀列表
export const fetchListGoodsSecKillByIds = (data = {}) => {
  return httpGet({
    url: "/goods/listGoodsSecKillByIds",
    data: data,
  });
};
//收藏答疑
export const fakeCollectOrUnCollectHelpQa = (data = {}) => {
  return httpPost({
    url: "/post/collectOrUnCollectPost",
    data: data,
  });
};


//收藏答疑
export const fetchListCollectUserHelpQa = (data = {}) => {
  return httpGet({
    url: "/post/listCollectPost",
    data: data,
  });
};
//
//获查询用户互动答疑
export function fetchUserHelpQa(data) {
  return httpGet({
    url: "/post/listPost",
    data: data,
  });
}


//保存客户地址
export async function fakeSaveUserAddress(data) {
  return httpPost({
    url: "/user/address/saveUserAddress",
    data: data,
  });
}

//提交表单
export async function fakeSaveUserInformation(data) {
  return httpPost({
    url: "/marketing/informationCollection/saveUserInformationCollection",
    data: data,
  });
}

//获取表单详情
export async function fetchInformationCollectionDetail(data) {
  return httpGet({
    url: "/marketing/informationCollection/getInformationCollectionDetail",
    data: data,
  });
}
////获取客户地址
export const fetchListUserAddress = (data = {}) => {
  return httpGet({
    url: "/user/address/listUserAddress",
    data: data,
  });
};

//兑换码领取
export async function fakeAuthCodePlay(data) {
  return httpPost({
    url: "/user/goods/authCodePlay",
    data: data,
  });
}


//预约秒杀
export async function fakeUserReserve(data) {
  return httpPost({
    url: "/goods/userReserve",
    data: data,
  });
}


//获取商品详情
export function fetchGoodsDetail(data) {
  return httpGet({
    url: "/user/goods/getGoodsDetail",
    data: data,
  });
}
//获取购买的商品详情
export function fetchUserBuyGoodsDetail(data) {
  return httpGet({
    url: "/user/goods/getUserBuyGoodsDetail",
    data: data,
  });
}
export function fetchViewGoods(data) {
  return httpPost({
    url: "/user/goods/viewGoods",
    data: data,
  });
}

//判断用户是否被拉黑
export function fakeInBlackList(data) {
  return httpPost({
    url: "/goods/checkInBlackList",
    data: data,
  });
}
//获取商品列表
export function fetchListGoods(data) {
  return httpGet({
    url: "/user/goods/listGoods",
    data: data,
  });
}
//获取分享信息
export async function fetchListUserInvite(data) {
  return httpGet({
    url: "/goods/listUserInvite",
    data: data,
  });
}

//获取直播带货商品
export function fetchUserGoodsCommerce(data) {
  return httpGet({
    url: "/goods/commerce/listUserGoodsCommerce",
    data: data,
  });
}
//检查用户是否能抽奖
export async function fetchLotteryQualification(data) {
  return httpGet({
    url: "/user/goods/checkUserLotteryQualification",
    data: data,
  });
}
//查看中奖用户数量
export async function fetchPrizeUserForUser(data) {
  return httpGet({
    url: "/goods/lottery/listGoodsLotteryPrizeUserForUser",
    data: data,
  });
}
////根据id获取商品列表
export const fetchCheckMiniProgramUpdate = (data = {}) => {
  return httpGet({
    url: "/common/version/checkMiniProgramUpdate",
    data: data,
  });
};


//解析阿里点播
export function fetchVideoPlayAuth(data) {
  return httpGet({
    url: "/common/vod/getVideoPlayAuth",
    data: data,
  });
}
//
export const fakeReadHelpQaMessage = (data = {}) => {
  return httpPost({
    url: "/helpQa/readHelpQaMessage",
    data: data,
  });
};
//答疑心跳信息
export const fetchHeartBeat = (data = {}) => {
  return httpGet({
    url: "/userQa/heartBeat",
    data: data,
  });
};
//获取商品列表
export function fetchListSubjectForCustomer(data) {
  return httpGet({
    url: "/base/subject/listSubjectForCustomer",
    data: data,
  });
}

//获取老师是否在线
export const fetchCheckTeacherOnlineStatus = (data = {}) => {
  return httpGet({
    url: "/userQa/checkTeacherOnlineStatus",
    data: data,
  });
};

//获取老师具体排班列表
export const fetchTeacherScheduleDateForCustomer = (data = {}) => {
  return httpGet({
    url: "/teacher/scheduleConfig/listTeacherScheduleDateForCustomer",
    data: data,
  });
};

//获查询用户互动答疑详情
export function fetchListUserHelpQaMessage(data) {
  return httpGet({
    url: "/helpQa/listUserHelpQaMessage",
    data: data,
  });
}
//获取客户列表聊天记录
export const fetchListUserQaForMessage = (data = {}) => {
  return httpGet({
    url: "/userQa/listUserQaForMessage",
    data: data,
  });
};
export const fetchListTeacherForCustomer = (data = {}) => {
  return httpGet({
    url: "/teacher/listTeacherForCustomer",
    data: data,
  });
};


//获查询用户互动答疑详情
export function fetchUserHelpQaById(data) {
  return httpGet({
    url: "/post/getPostById",
    data: data,
  });
}

//获查询用户互动答疑详情
export function fetchUserHelpQaAnswer(data) {
  return httpGet({
    url: "/post/listPostAnswer",
    data: data,
  });
}


//获查询用户互动答疑详情
export function fetchUserHelpQaAnswerById(data) {
  return httpGet({
    url: "/post/getPostAnswerById",
    data: data,
  });
}

//获查询用户互动答疑详情
export function fetchUserHelpQaAnswerComment(data) {
  return httpGet({
    url: "/post/listPostAnswerComment",
    data: data,
  });
}


//设置
export const fakeSaveHelpQa = (data = {}) => {
  return httpPost({
    url: "/post/savePost",
    data: data,
  });
};



//点赞回答
export const fakLikeOrCancelLikeHelpQaAnswer = (data = {}) => {
  return httpPost({
    url: "/post/likeOrCancelLikePostAnswer",
    data: data,
  });
};


//点赞评论
export const fakeLikeHelpQaAnswerComment = (data = {}) => {
  return httpPost({
    url: "/post/likePostAnswerComment",
    data: data,
  });
};
//点踩互助答疑评论
export const fakeUnLikeHelpQaAnswerComment = (data = {}) => {
  return httpPost({
    url: "/post/unLikePostAnswerComment",
    data: data,
  });
};


//收藏回答
export const fakeCollectOrUnCollectHelpQaAnswer = (data = {}) => {
  return httpPost({
    url: "/post/collectOrUnCollectPostAnswer",
    data: data,
  });
};

//修改问题
export const fakeEditAnswer = (data = {}) => {
  return httpPost({
    url: "/post/editAnswer",
    data: data,
  });
};


//保存答疑回答
export const fakeSaveHelpQaAnswer = (data = {}) => {
  return httpPost({
    url: "/post/savePostAnswer",
    data: data,
  });
};




//删除回答
export const fakeRemoveAnswer = (data = {}) => {
  return httpPost({
    url: "/post/removeAnswer",
    data: data,
  });
};


//删除回答
export const fakeSaveHelpQaAnswerComment = (data = {}) => {
  return httpPost({
    url: "/post/savePostAnswerComment",
    data: data,
  });
};
